<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>中国行政区生态等级与分布查询系统</title>
    <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css"/>
    <link rel="stylesheet" type="text/css" href="./index.css"/>
    <style>
        /* 导航栏样式 */
        .navbar {
            display: flex;
            justify-content: space-around;
            background-color: #333;
            padding: 10px;
        }

        .navbar a {
            color: white;
            padding: 14px 20px;
            text-decoration: none;
            text-align: center;
        }

        .navbar a:hover {
            background-color: #ddd;
            color: black;
        }

        .content {
            display: none;
            height: 100vh; /* 确保内容区域有足够高度 */
        }

        .content.active {
            display: block;
        }

        #container-boundary, #container-ecodistribution {
            height: 100%; /* 确保地图容器有足够高度 */
            width: 100%; /* 确保地图容器有足够宽度 */
        }
    </style>
    <!-- 重要，请到 https://console.amap.com 申请 JS API 的 key和密钥 -->
    <script>
        window._AMapSecurityConfig = {
            securityJsCode: '95f4b4f7a70584b4ac8fe7f61a2ea6bc',
        }
    </script>
</head>

<body>
<div class="navbar">
    <a href="#" onclick="showSection('boundary')">行政区生态等级查询</a>
    <a href="#" onclick="showSection('ecodistribution')">全国各区县生态分布</a>
</div>

<div id="boundary" class="content active">
    <div id="container-boundary"></div>
    <div class="input-card">
        <label style="color:grey">行政区生态等级查询</label>
        <div class="input-item">
            <div class="input-item-prepend">
                <span class="input-item-text">行政级别</span>
            </div>
            <select id="level">
                <option value="district">district</option>
                <option value="city">city</option>
                <option value="province">province</option>
            </select>
        </div>
        <div class="input-item">
            <div class="input-item-prepend">
                <span class="input-item-text">名称/adcode</span>
            </div>
            <input id="district" type="text" value="朝阳区">
        </div>
<!--        <div class="input-item">-->
<!--            <div class="input-item-prepend">-->
<!--                <span class="input-item-text">浮动</span>-->
<!--            </div>-->
<!--            <input id="percent" type="text" value="5%">-->
<!--        </div>-->
        <input id="draw" type="button" class="btn" value="查询"/>
<!--        <input id="json" type="button" class="btn" value="生成json"/>-->
    </div>
</div>

<div id="ecodistribution" class="content">
    <div id="container-ecodistribution"></div>
    <div class="input-card">
        <label style="color:grey">全国各区县生态分布</label>
        <!-- 添加生态分布相关的输入项 -->
        <div class="input-item">
            <div class="input-item-prepend">
                <span class="input-item-text">生态类型</span>
            </div>
            <select id="ecotype">
                <option value="forest">森林</option>
                <option value="grassland">草原</option>
                <option value="wetland">湿地</option>
            </select>
        </div>
        <input id="view" type="button" class="btn" value="查看"/>
    </div>
</div>

<!-- 图例容器 -->
<div id="legend" class="legend"></div>
<script type="text/javascript"
        src="https://webapi.amap.com/maps?v=2.0&key=4a2b9b85b35dee9343fbae3d829c671f&plugin=AMap.DistrictSearch"></script>
<script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script>
<!--  <script src="./js/index.js"></script>-->
<script src="./js/main.js"></script> <!-- 引入 main.js 文件 -->
<script src="./js/districtEcoFinder.js"></script>
<script src="./js/districtBoundaryQuery.js"></script>

</body>

</html>
